fix: replace deprecated metods.
authorZhi <yfwz100@yeah.net>
Sun, 6 Jun 2021 15:39:43 +0000 (23:39 +0800)
committerZhi <yfwz100@yeah.net>
Tue, 8 Jun 2021 14:47:53 +0000 (22:47 +0800)
Use NSInputContext to replace NSInputManager, which has been deprecated
since 10.6.

Sync from 0e30a96 in gtk3.

gtk/gtkimcontextquartz.c

index 8b204222f239a9d303e70d2b432df4b668fea305..62ca2c4e5679874d3c88cd5e19ffd919143e264f 100644 (file)
@@ -239,8 +239,7 @@ discard_preedit (GtkIMContext *context)
 
   /* reset any partial input for this NSView */
   [(GdkMacosBaseView *)nsview unmarkText];
-  NSInputManager *currentInputManager = [NSInputManager currentInputManager];
-  [currentInputManager markedTextAbandoned:nsview];
+  [[NSTextInputContext currentInputContext] discardMarkedText];
 
   if (qc->preedit_str && strlen (qc->preedit_str) > 0)
     {